/*
 * @(#)JessxTools.java 1.0 2003/10/16
 * 
 * Copyright 2003 Thomas Barnekow. All Rights Reserved.
 * 
 * This software is the proprietary information of Thomas Barnekow. Use is
 * subject to license terms.
 */
package jessx.util;

import jess.*;

/**
 * Some useful tools.
 * 
 * @author ThomasBarnekow
 *  
 */
public class JessxTools {

	/**
	 * Get fact name without the leading module name
	 */
	public static String getFactName(Fact fact) {
		return getFactName(fact.getName());
	}

	/**
	 * Get fact name without the leading module name
	 */
	public static String getFactName(String fullName) {
		int pos = fullName.indexOf("::");
		if (pos < 1)
			return fullName;
		else
			return fullName.substring(pos + 2);
	}
}
